import numpy as np

def detect_adversarial_attack(input_data, threshold=0.1):
    """
    检测输入数据是否为对抗样本
    :param input_data: 输入数据
    :param threshold: 异常阈值
    :return: 是否为对抗样本
    """
    # 计算输入数据的异常分数
    anomaly_score = np.var(input_data)
    return anomaly_score > threshold

# 示例
input_data = np.random.randn(100)
is_adversarial = detect_adversarial_attack(input_data)
print(f"Is adversarial: {is_adversarial}")